﻿using HamcoWcs.Contract.ContractCommon;
using HamcoWcs.Models.Common;
using HamcoWcs.Models.Common.Enums;
using HamcoWcs.Models.Monitors;

namespace HamcoWcs.Service.Common
{
    [AutoInject(typeof(IMonitorBaseService), InjectType.Single)]
    public class MonitorBaseService : IMonitorBaseService
    {
        private readonly MonitorData _monitorData;

        public MesMonitorData MesMonitor { get; set; }
        public MonitorBaseService()
        {
            _monitorData = new MonitorData();
            MesMonitor = new MesMonitorData();
        }

        public int MesControlState
        {
            get => _monitorData.MesControlState;
            set
            {
                if (value != 0 || value != 1)
                    value = 0;
                _monitorData.MesControlState = value;
            }
        }



        public MonitorData GetMonitorData()
        {

            return _monitorData;
        }


    }
}
